#! /bin/bash

OUT=`ps -ef | grep -i RenewAdv | grep -i java`
DIR=/home/etomjak/RenewAdvertisement

if [ "${OUT}" == "" ]
then
  echo `date '+%y-%m-%d %H:%M:%S'` " - ERROR - Process RenewAdvertisement NOT running!!!" | tee -a ${DIR}/CheckRenewAdvertisement.log
  ${DIR}/StartRenewAdvertisement.sh 
else
  echo `date '+%y-%m-%d %H:%M:%S'` " - Process RenewAdv is RUNNING!!!" | tee -a ${DIR}/CheckRenewAdvertisement.log
fi
